home *** CD-ROM | disk | FTP | other *** search
/ PCMania 64 / PCMania CD64_1.iso / phy / phy006 / lowlevel / inicrexe.asm < prev    next >
Encoding:
Assembly Source File  |  1997-12-09  |  2.6 KB  |  88 lines

  1. .model tiny
  2. locals
  3. .386
  4. .code
  5.  
  6. ORG     0050h
  7.  
  8. Main                    proc
  9.                         push    cs
  10.                         pop     ds
  11.                         push    cs
  12.                         pop     es
  13.                         push    di
  14.                         mov     di, offset RegAX
  15.                         call    Ponlo
  16.                         mov     ax, bx
  17.                         mov     di, offset RegBX
  18.                         call    Ponlo
  19.                         mov     ax, cx
  20.                         mov     di, offset RegCX
  21.                         call    Ponlo
  22.                         mov     ax, dx
  23.                         mov     di, offset RegDX
  24.                         call    Ponlo
  25.                         mov     ax, si
  26.                         mov     di, offset RegSI
  27.                         call    Ponlo
  28.                         pop     di
  29.                         mov     ax, di
  30.                         mov     di, offset RegDI
  31.                         call    Ponlo
  32.                         mov     ax, bp
  33.                         mov     di, offset RegBP
  34.                         call    Ponlo
  35.                         mov     ah, 09
  36.                         mov     dx, offset Mensaje
  37.                         int     21h
  38.                         mov     ax, 4c00h
  39.                         int     21h
  40. Main                    endp
  41.  
  42. Ponlo                   proc
  43.                         mov     byte ptr [control], 0
  44.                         jmp     Salto
  45.            Salto2:      mov     byte ptr [control], 1
  46.            Salto:       push    ax
  47.                         push    bx
  48.                         mov     bx, offset Numero
  49.                         mov     al, ah
  50.                         and     ax, 0f00fh
  51.                         ror     ah, 4
  52.                         xchg    ah, al
  53.                         xlat
  54.                         stosb
  55.                         xchg    ah, al
  56.                         xlat
  57.                         stosb
  58.                         pop     bx
  59.                         pop     ax
  60.                         cmp     byte ptr [control], 1
  61.                         jz      Acaba
  62.                         xchg    ah, al
  63.                         jmp     Salto2
  64.             Acaba:      ret
  65. Ponlo                   endp
  66.  
  67. Numero  db      '0123456789ABCDEF'
  68.  
  69. Control db      0
  70.  
  71. Mensaje db 'AX='
  72. RegAX   dd 0
  73.         db ' BX='
  74. RegBX   dd 0
  75.         db ' CX='
  76. RegCX   dd 0
  77.         db ' DX='
  78. RegDX   dd 0
  79.         db ' SI='
  80. RegSI   dd 0
  81.         db ' DI='
  82. RegDI   dd 0
  83.         db ' BP='
  84. RegBP   dd 0
  85.         db '$'
  86.  
  87.                         end     Main
  88.